#ifndef WINDOW_H
#define WINDOW_H

#include <GL/glut.h>
#include "scene.h"

class Window;

class WindowCreator
{
  public:
  WindowCreator();
  ~WindowCreator();
  static Window* createWindow(const char * titre, int x, int y, int width, int height, int *argc, char **argv);
  //protected:
  static void callDisplayFunc();
  static void callReshapeFunc(int width, int height);
  static void callKeyboardFunc(unsigned char key, int x, int y);
  static void callMouseFunc(int bouton, int etat, int x, int y);
  static void callMouseMotionFunc(int x, int y);
  static void callMousePassiveMotionFunc(int x, int y);
  static void callTimerFunc(int value);
  static void callMenuCallback(int item);
  static Window* _currentWindow;
};

class Window
{
  public:
  Window(int x, int y, int width, int height, int *argc, char **argv);
  ~Window();
  
  void setScene(Scene *s);
  Scene* getScene();
  void mainLoop();
  
  protected:
  Scene *_scene;
};

#endif


